package com.ticket.system.mapper;

import com.ticket.system.domain.YanchuStatisticsOpera;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 【请填写功能名称】Mapper接口
 * 
 * @author ruoyi
 * @date 2024-03-14
 */
public interface YanchuStatisticsOperaMapper 
{
    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    public YanchuStatisticsOpera selectYanchuStatisticsOperaById(Long id);

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param yanchuStatisticsOpera 【请填写功能名称】
     * @return 【请填写功能名称】集合
     */
    public List<YanchuStatisticsOpera> selectYanchuStatisticsOperaList(YanchuStatisticsOpera yanchuStatisticsOpera);

    /**
     * 新增【请填写功能名称】
     * 
     * @param yanchuStatisticsOpera 【请填写功能名称】
     * @return 结果
     */
    public int insertYanchuStatisticsOpera(YanchuStatisticsOpera yanchuStatisticsOpera);

    /**
     * 修改【请填写功能名称】
     * 
     * @param yanchuStatisticsOpera 【请填写功能名称】
     * @return 结果
     */
    public int updateYanchuStatisticsOpera(YanchuStatisticsOpera yanchuStatisticsOpera);

    /**
     * 删除【请填写功能名称】
     * 
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    public int deleteYanchuStatisticsOperaById(Long id);

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteYanchuStatisticsOperaByIds(Long[] ids);

    /**
     * 按天按剧院统计销售额 订单数
     * @param prevDate
     * @return
     */
    public List<YanchuStatisticsOpera> staticsPrevOrderByOpera(@Param("prevDate")String prevDate);

    /**
     * 按天按剧院统计票数
     * @param prevDate
     * @return
     */
    public List<YanchuStatisticsOpera> staticsPrevOrderTicketByOpera(@Param("prevDate")String prevDate);

    /**
     * 按剧院统计场次数量
     * @return
     */
    public List<Map<String,Object>> staticsSessionByOpera();

    /**
     * 按剧院统计总销售
     * @return
     */
    public List<Map<String, Object>> staticsOrderByOpera();

    public List<Map<String, Object>> staticsOrderByOperaToday();

    public List<Map<String, Object>> staticsAllOrderTotalByOpera();

    public List<Map<String, Object>> staticsAllOrderByOpera();

    public List<YanchuStatisticsOpera> staticsAllPrevOrderByOpera();

    public List<YanchuStatisticsOpera> staticsAllPrevOrderTicketByOpera();

    /**
     * 按剧院统计客单价
     * @return
     */
    public List<Map<String, Object>> staticsPerOrderByOpera();

    public List<Map<String, Object>> staticsOrderByOperaTicketToday();

    public List<Map<String, Object>> staticsAllByOperaTicket();

    public int insertBatchOpera(@Param("array") List<YanchuStatisticsOpera> array);

    @MapKey("countDept")
    public List<Map<String, Object>> listBusinessByHall(@Param("operaId")Long operaId,@Param("hallId")Long hallId);
//    @MapKey("countPerform")
    public List<Map<String, Object>> listBusinessBySessionData(@Param("startTime")String startTime,@Param("endTime")String endTime,
                                                               @Param("operaId")Long operaId,@Param("hallId")Long hallId);
    @MapKey("totalMoneyProg")
    public List<Map<String, Object>> listBusinessBySells(@Param("startTime")String startTime,@Param("endTime")String endTime,
                                                             @Param("operaId")Long operaId,@Param("hallId")Long hallId);
    @MapKey("countProgUsers")
    public List<Map<String, Object>> listBusinessBySellsProg(@Param("startTime")String startTime,@Param("endTime")String endTime,
                                                             @Param("operaId")Long operaId,@Param("hallId")Long hallId);
    @MapKey("ticketWayName")
    public List<Map<String, Object>> listBusinessByTicketFrom(@Param("startTime")String startTime,@Param("endTime")String endTime,
                                                              @Param("orderBy")String orderBy,@Param("sort")String sort,
                                                              @Param("operaId")Long operaId,@Param("hallId")Long hallId);
    @MapKey("classifyName")
    public List<Map<String, Object>> listBusinessByPerform(@Param("startTime")String startTime,@Param("endTime")String endTime,
                                                           @Param("orderBy")String orderBy,@Param("sort")String sort,
                                                           @Param("operaId")Long operaId,@Param("hallId")Long hallId);
    @MapKey("performName")
    public List<Map<String, Object>> listBusinessByPerformSells(@Param("startTime")String startTime,@Param("endTime")String endTime,
                                                                @Param("orderBy")String orderBy,@Param("sort")String sort,
                                                                @Param("operaId")Long operaId,@Param("hallId")Long hallId);

    @MapKey("performName")
    public List<Map<String, Object>> listBusinessBySessionSells(@Param("startTime")String startTime,@Param("endTime")String endTime,
                                                                @Param("orderBy")String orderBy,@Param("sort")String sort,
                                                                @Param("operaId")Long operaId,@Param("hallId")Long hallId);

}
